package dto;

public class ReservationDTO {
	private int reservationNo;
	private String checkin;
	private String checkout;
	private String checkinTime;
	private int guests;
	private int cost;
	private String memberId;
	private MemberDTO member;
	private int roomNo;
	private RoomDTO room;
	private String reservationCode;
	private ReservationStateDTO reservationC;
	public ReservationDTO() {
		super();
	}
	public ReservationDTO(int reservationNo, String checkin, String checkout,
			String checkinTime, int guests, int cost, String memberId,
			MemberDTO member, int roomNo, RoomDTO room, String reservationCode,
			ReservationStateDTO reservationC) {
		super();
		this.reservationNo = reservationNo;
		this.checkin = checkin;
		this.checkout = checkout;
		this.checkinTime = checkinTime;
		this.guests = guests;
		this.cost = cost;
		this.memberId = memberId;
		this.member = member;
		this.roomNo = roomNo;
		this.room = room;
		this.reservationCode = reservationCode;
		this.reservationC = reservationC;
	}
	public int getReservationNo() {
		return reservationNo;
	}
	public void setReservationNo(int reservationNo) {
		this.reservationNo = reservationNo;
	}
	public String getCheckin() {
		return checkin;
	}
	public void setCheckin(String checkin) {
		this.checkin = checkin;
	}
	public String getCheckout() {
		return checkout;
	}
	public void setCheckout(String checkout) {
		this.checkout = checkout;
	}
	public String getCheckinTime() {
		return checkinTime;
	}
	public void setCheckinTime(String checkinTime) {
		this.checkinTime = checkinTime;
	}
	public int getGuests() {
		return guests;
	}
	public void setGuests(int guests) {
		this.guests = guests;
	}
	public int getCost() {
		return cost;
	}
	public void setCost(int cost) {
		this.cost = cost;
	}
	public String getMemberId() {
		return memberId;
	}
	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}
	public MemberDTO getMember() {
		return member;
	}
	public void setMember(MemberDTO member) {
		this.member = member;
	}
	public int getRoomNo() {
		return roomNo;
	}
	public void setRoomNo(int roomNo) {
		this.roomNo = roomNo;
	}
	public RoomDTO getRoom() {
		return room;
	}
	public void setRoom(RoomDTO room) {
		this.room = room;
	}
	public String getReservationCode() {
		return reservationCode;
	}
	public void setReservationCode(String reservationCode) {
		this.reservationCode = reservationCode;
	}
	public ReservationStateDTO getReservationC() {
		return reservationC;
	}
	public void setReservationC(ReservationStateDTO reservationC) {
		this.reservationC = reservationC;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((checkin == null) ? 0 : checkin.hashCode());
		result = prime * result
				+ ((checkinTime == null) ? 0 : checkinTime.hashCode());
		result = prime * result
				+ ((checkout == null) ? 0 : checkout.hashCode());
		result = prime * result + cost;
		result = prime * result + guests;
		result = prime * result
				+ ((memberId == null) ? 0 : memberId.hashCode());
		result = prime * result
				+ ((reservationC == null) ? 0 : reservationC.hashCode());
		result = prime * result
				+ ((reservationCode == null) ? 0 : reservationCode.hashCode());
		result = prime * result + reservationNo;
		result = prime * result + ((room == null) ? 0 : room.hashCode());
		result = prime * result + roomNo;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ReservationDTO other = (ReservationDTO) obj;
		if (checkin == null) {
			if (other.checkin != null)
				return false;
		} else if (!checkin.equals(other.checkin))
			return false;
		if (checkinTime == null) {
			if (other.checkinTime != null)
				return false;
		} else if (!checkinTime.equals(other.checkinTime))
			return false;
		if (checkout == null) {
			if (other.checkout != null)
				return false;
		} else if (!checkout.equals(other.checkout))
			return false;
		if (cost != other.cost)
			return false;
		if (guests != other.guests)
			return false;
		if (memberId == null) {
			if (other.memberId != null)
				return false;
		} else if (!memberId.equals(other.memberId))
			return false;
		if (reservationC == null) {
			if (other.reservationC != null)
				return false;
		} else if (!reservationC.equals(other.reservationC))
			return false;
		if (reservationCode == null) {
			if (other.reservationCode != null)
				return false;
		} else if (!reservationCode.equals(other.reservationCode))
			return false;
		if (reservationNo != other.reservationNo)
			return false;
		if (room == null) {
			if (other.room != null)
				return false;
		} else if (!room.equals(other.room))
			return false;
		if (roomNo != other.roomNo)
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "ReservationDTO [reservationNo=" + reservationNo + ", checkin="
				+ checkin + ", checkout=" + checkout + ", checkinTime="
				+ checkinTime + ", guests=" + guests + ", cost=" + cost
				+ ", memberId=" + memberId + ", roomNo=" + roomNo + ", room="
				+ room + ", reservationCode=" + reservationCode
				+ ", reservationC=" + reservationC + "]";
	}
}
